import request from "@/utils/functions/request";

// 字段列表
export function ledgerFieldTabApi(query: any): Promise<any> {
  return request({
    url: "/cdledger/ledger-field-do/ledgerFieldTab",
    method: "get",
    params: query,
  });
}

// 导入字段
export function ledgerFieldImportApi(data: any): Promise<any> {
  return request({
    url: "/cdledger/ledger-field-do/ledgerFieldImport",
    method: "post",
    headers: {
      "Content-Type": "application/form-data;charset=utf-8"
    },
    data,
  });
}

// 新增字段
export function ledgerFieldFormApi(data: any): Promise<any> {
  return request({
    url: "/cdledger/ledger-field-do/ledgerFieldForm",
    method: "post",
    data,
  });
}

// 删除字段
export function ledgerFieldDelApi(query: any): Promise<any> {
  return request({
    url: "/cdledger/ledger-field-do/ledgerFieldDel",
    method: "get",
    params: query,
  });
}

// 级别列表
export function ledgerFieldSelectTabApi(query: any): Promise<any> {
  return request({
    url: "/cdledger/ledger-field-select-do/ledgerFieldSelectTab",
    method: "get",
    params: query,
  });
}

// 新增级别
export function ledgerFieldSelectFormApi(data: any): Promise<any> {
  return request({
    url: "/cdledger/ledger-field-select-do/ledgerFieldSelectForm",
    method: "post",
    data,
  });
}

// 删除级别
export function ledgerFieldSelectDelApi(query: any): Promise<any> {
  return request({
    url: "/cdledger/ledger-field-select-do/ledgerFieldSelectDel",
    method: "get",
    params: query,
  });
}

// 重复校验
export function ledgerFieldRepeatApi(query: any): Promise<any> {
  return request({
    url: "/cdledger/ledger-field-do/ledgerFieldRepeat",
    method: "get",
    params: query,
  });
}


